FLAGS = -O2 -Wall -g

default: RandomTreeTest

Line.o: Line.hpp Line.cpp Object.hpp
	g++ -c $(FLAGS) Line.cpp -o Line.o

OrientedSegment.o: OrientedSegment.hpp OrientedSegment.cpp Object.hpp
	g++ -c $(FLAGS) OrientedSegment.cpp -o OrientedSegment.o

Point.o: Point.hpp Point.cpp Object.hpp
	g++ -c $(FLAGS) Point.cpp -o Point.o

# -- tests -- #

LineTest: Line.hpp Line.o
	g++ $(FLAGS) `allegro-config --libs` LineTest.cpp Line.o -o LineTest.cpp.bin
	./LineTest.cpp.bin

OrientedSegmentTest: OrientedSegment.hpp OrientedSegment.o
	g++ $(FLAGS) `allegro-config --libs` OrientedSegmentTest.cpp OrientedSegment.o -o OrientedSegmentTest.cpp.bin
	./OrientedSegmentTest.cpp.bin
